<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.lmpop.trade.ts_nav.*" %>
<%@ page import="java.util.*" %>
<% 
  	String nav_id="";
  	if(request.getParameter("nav_id")!=null) nav_id = request.getParameter("nav_id");
  	Ts_navInfo ts_navInfo = new Ts_navInfo();
  	List list = ts_navInfo.getListByPk(nav_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String cust_id="",nav_name="",ifshow="",sort_order="",opennew="",link_url="",nav_post="";
  	if(map.get("cust_id")!=null) cust_id = map.get("cust_id").toString();
  	if(map.get("nav_name")!=null) nav_name = map.get("nav_name").toString();
  	if(map.get("ifshow")!=null) ifshow = map.get("ifshow").toString();
  	if(map.get("sort_order")!=null) sort_order = map.get("sort_order").toString();
  	if(map.get("opennew")!=null) opennew = map.get("opennew").toString();
  	if(map.get("link_url")!=null) link_url = map.get("link_url").toString();
  	if(map.get("nav_post")!=null) nav_post = map.get("nav_post").toString();
	
	String iStart = "0";
	if(request.getParameter("iStart")!=null && !request.getParameter("iStart").equals("")){
		iStart = request.getParameter("iStart");
	}
	String navname = "";
	if(request.getParameter("navname")!=null && !request.getParameter("navname").equals("")){
		navname = new String(request.getParameter("navname").trim().getBytes("utf-8"));
	}

	String navpost = "";
	if(request.getParameter("navpost")!=null && !request.getParameter("navpost").equals("")){
		navpost = request.getParameter("navpost");
	}	

	String url = "/program/admin/nav/index.jsp?navname="+navname+"&navpost="+navpost+"&iStart="+iStart;
%>
<html>
  <head>
    
    <title>导航栏管理</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="nav.js"></script>
	<script type="text/javascript" src="/program/admin/js/judgment.js" charset="UTF-8"></script>
</head>

<body>

  
	
	<h1>修改导航栏</h1>
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
		
		<input name="cust_id" id="cust_id" value="<%=cust_id %>" type="hidden" />

		
		<tr>
			<td align="right" width="15%">
				导航名称<font color="red">*</font>
			</td>
			<td><input name="nav_name" id="nav_name" value="<%=nav_name %>" maxlength="50" type="text" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this)" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				是否显示:
			</td>
			<td>
				<input name="ifshow" id="ifshow" value="0" type="radio" <%if(ifshow.equals("0")){out.print("checked");}%>/>是
				<input name="ifshow" id="ifshow" value="1" type="radio" <%if(ifshow.equals("1")){out.print("checked");}%>/>否
			</td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				排序<font color="red">*</font>
			</td>
			<td><input name="sort_order" id="sort_order" value="<%=sort_order %>" type="text" size="2" maxlength="2" onKeyUp="if(!/^[0-9][0-9]*$/.test(this.value))this.value=''"/></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				是否打开新窗口:
			</td>
			<td>
				<input name="opennew" id="opennew" value="0" type="radio" <%if(opennew.equals("0")){out.print("checked");}%>/>是
				<input name="opennew" id="opennew" value="1" type="radio" <%if(opennew.equals("1")){out.print("checked");}%>/>否
			</td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				链接地址<font color="red">*</font>
			</td>
			<td><input name="link_url" id="link_url" value="<%=link_url %>" maxlength="50" type="text" size="40" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this)"/></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				子系统:
			</td>
			<td>
				<input name="nav_post" id="nav_post" value="0" type="radio" <%if(nav_post.equals("0")){out.print("checked");}%>/>B2B
				<input name="nav_post" id="nav_post" value="1" type="radio" <%if(nav_post.equals("1")){out.print("checked");}%>/>团购
				<input name="nav_post" id="nav_post" value="2" type="radio" <%if(nav_post.equals("2")){out.print("checked");}%>/>b2c商城
				<input name="nav_post" id="nav_post" value="3" type="radio" <%if(nav_post.equals("3")){out.print("checked");}%>/>c2c商铺
			</td>
		</tr>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="5670" />
	  			<input type="hidden" name="nav_id" value="<%=nav_id %>" />
				<input type="hidden" name="jumpurl" value="<%=url%>" />
				<input type="submit" class="buttoncss" name="tradeSub" value="提交" onclick="return checkInfo()"/>&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='<%=url%>';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
